package com.xinzhi.controller;

import com.xinzhi.pojo.dto.Bumentai;
import com.xinzhi.pojo.dto.Mnhgty;
import com.xinzhi.service.BumentaiService;
import com.xinzhi.service.ManagerService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BumentaiController {
    @Autowired
    private BumentaiService bumentaiService;

    @Autowired
    private ManagerService managerService;

    /**
     * 部门台账评分汇总根据成绩申述状态查询
     * @param appeal_status
     */
    @GetMapping("/bumentai")
    Result selectAll(@RequestParam("appeal_status") String appeal_status){
        Result result = bumentaiService.selectAll(appeal_status);
        return result;
    }


    /**
     * 部门台账评分汇总根据考核对象的查询接口
     * @param object
     * @return
     */
    @GetMapping("/getSummay")
    public  Result getSummay(String object){
        Result summay = managerService.getSummay(object);
        return summay;
    }


    /**
     * 部门台账评分汇总接口
     */

    @GetMapping("/selectbumen")
    public Result<Mnhgty> selectbumen() {
        return bumentaiService.selectbumen();
    }

    /**
     * 部门台账评分汇总根据进展状态查询接口
     * @param statet
     * @return
     */
    @GetMapping("/selectbumenzhuangtai")
    Result selectbumenzhuangtai(String statet){
        Result selectbumenzhuangtai = bumentaiService.selectbumenzhuangtai(statet);
        return selectbumenzhuangtai;
    }
}
